﻿<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>weiy-直播商城系统官方安装程序</title>
    <link href="{{ asset("assets/style/install.css") }}" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="{{ asset("assets/style/jquery.js") }}"></script>
    <script>
        $(document).ready(function () {
            $('#next').on('click', function () {
                if (typeof ($('.no').html()) == 'undefined') {
                    // $(this).attr('href', 'index.php?step=2');
                } else {
                    alert($('.no').eq(0).parent().parent().find('td:first').html() + ' 未通过检测!');
                    $(this).attr('href', '###');
                }
            });
        });
    </script>
</head>
<body>
<div class="header">
    <div class="layout">
        <div class="title">
            <h2>系统安装向导</h2>
        </div>
        <div class="version">版本: 目前最新版</div>
    </div>
</div>
<div class="main">
    <div class="step-box" id="step1">
        <div class="text-nav">
            <h1>Step.1</h1>
            <h2>开始安装</h2>
            <h5>检测服务器环境及文件目录权限</h5>
        </div>
        <div class="procedure-nav">
            <div class="schedule-ico"><span class="a"></span><span class="c"></span><span class="d"></span></div>
            <div class="schedule-point-now"><span class="a"></span><span class="c"></span><span class="d"></span></div>
            <div class="schedule-point-bg"><span class="a"></span><span class="c"></span><span class="d"></span></div>
            <div class="schedule-line-now"><em></em></div>
            <div class="schedule-line-bg"></div>
            <div class="schedule-text">
                <span class="a">检查安装环境</span>
                <span class="c">创建数据库</span>
                <span class="d">安装</span>
            </div>
        </div>
    </div>
    <div class="content-box">
        <table width="100%" border="0" cellspacing="2" cellpadding="0">
            <caption>
                环境检查
            </caption>
            <tr>
                <th scope="col">项目</th>
                <th width="25%" scope="col">程序所需</th>
                <th width="25%" scope="col">最佳配置推荐</th>
                <th width="25%" scope="col">当前服务器</th>
            </tr>
            @foreach($env as $item)
                <tr>
                    <td scope="row">{{ $item[0] }}</td>
                    <td>{{ $item[1] }}</td>
                    <td>{{ $item[2] }}</td>
                    <td><span @if($item[4] == "success") class="yes" @else class="no" @endif><i></i>{{ $item[3] }}</span></td>
                </tr>
            @endforeach
        </table>
        <table width="100%" border="0" cellspacing="2" cellpadding="0">
            <caption>
                目录、文件权限检查
            </caption>
            <tr>
                <th scope="col">目录文件</th>
                <th width="25%" scope="col">所需状态</th>
                <th width="25%" scope="col">当前状态</th>
            </tr>
            @foreach($dirAndFile as $value)
            <tr>
                <td>{{$value[3]}}</td>
                <td><span>{{$value[1]}}</span></td>
                <td><span @if($value[4] == "success") class="yes" @else class="no" @endif><i></i>{{$value[2]}}</span></td>
            </tr>
            @endforeach
        </table>
        <table width="100%" border="0" cellspacing="2" cellpadding="0">
            <caption>
                函数检查
            </caption>
            <tr>
                <th scope="col">目录文件</th>
                <th width="25%" scope="col">所需状态</th>
                <th width="25%" scope="col">当前状态</th>
            </tr>
            @foreach($function as $value)
            <tr>
                <td>{{ $value[0] }}</td>
                <td><span>{{ $value[1] }}</span></td>
                <td><span @if($value[3] == "success") class="yes" @else class="no" @endif><i></i>{{ $value[2] }}</span></td>
            </tr>
            @endforeach
        </table>
    </div>
    <div class="btn-box">
        <a href="{{ route('install.index') }}" class="btn btn-primary">上一步</a>
        <a href="{{ route("install.step2") }}" id="next" class="btn btn-primary">下一步</a>
    </div>
</div>
<div class="footer">
    <h6><a href="" target="_blank"></a></h6>
</div>
</body>
</html>
